home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 9 / Night Owl CD-ROM (NOPV9) (Night Owl Publisher) (1993).ISO / 050a / snr53b.zip / CAP2LC1.S < prev    next >
Text File  |  1993-05-30  |  3KB  |  185 lines

  1. \  CAP2LC1.S
  2. \  This table will transform an all-upper-case file into upper and lower
  3. \  Sentence-style (1st word of a sentence is caps, all others lower case)
  4.  
  5. \     What you do is run this table on your all-cap input files first,
  6. \     then run CAP2LC2.S to clean-up any straggler words that got misconverted
  7. \     in this pass
  8.  
  9. \s=*01        \ beginning of file sets the cap flag
  10.  
  11. \  Note: almost all of these equations could be eliminated by using 
  12. \  a wild card conversion routine, but I've chosen to use the literals
  13. \  for increased speed.
  14.  
  15. A*01=A*00      \ Keep the Cap if flag 1 is ON, then turn it OFF
  16. B*01=B*00
  17. C*01=C*00
  18. D*01=D*00
  19. E*01=E*00
  20. F*01=F*00
  21. G*01=G*00
  22. H*01=H*00
  23. I*01=I*00
  24. J*01=J*00
  25. K*01=K*00
  26. L*01=L*00
  27. M*01=M*00
  28. N*01=N*00
  29. O*01=O*00
  30. P*01=P*00
  31. Q*01=Q*00
  32. R*01=R*00
  33. S*01=S*00
  34. T*01=T*00
  35. U*01=U*00
  36. V*01=V*00
  37. W*01=W*00
  38. X*01=X*00
  39. Y*01=Y*00
  40. Z*01=Z*00
  41.  
  42. \  all other characters reset the flag and force lower case
  43. \  some of the following conversions are commented out, take note.
  44.  
  45. \00=\00*00
  46. \01=\01*00
  47. \02=\02*00
  48. \03=\03*00
  49. \04=\04*00
  50. \05=\05*00
  51. \06=\06*00
  52. \07=\07*00
  53. \08=\08*00
  54. \ \09=\09*00
  55. \ \0A=\0A*00
  56. \0B=\0B*00
  57. \0C=\0C*00
  58. \ \0D=\0D*00
  59. \0E=\0E*00
  60. \0F=\0F*00
  61. \10=\10*00
  62. \11=\11*00
  63. \12=\12*00
  64. \13=\13*00
  65. \14=\14*00
  66. \15=\15*00
  67. \16=\16*00
  68. \17=\17*00
  69. \18=\18*00
  70. \19=\19*00
  71. \1A=\1A*00
  72. \1B=\1B*00
  73. \1C=\1C*00
  74. \1D=\1D*00
  75. \1E=\1E*00
  76. \1F=\1F*00
  77. \ \20=\20*00
  78. !=!*00
  79. \ "="*00    \ commented out because we want Caps to appear after quotes
  80. #=#*00
  81. $=$*00
  82. %=%*00
  83. &=&*00
  84. '='*00
  85. \ (=(*00    \ commented out because we want Caps to appear after paren
  86. )=)*00
  87. \ \2A=\2A*00   \ etc. etc.
  88. \ \2B=\2B*00
  89. ,=,*00
  90. \ -=-*00
  91. .=.*00
  92. /=/*00
  93. 0=0*00
  94. 1=1*00
  95. 2=2*00
  96. 3=3*00
  97. 4=4*00
  98. 5=5*00
  99. 6=6*00
  100. 7=7*00
  101. 8=8*00
  102. 9=9*00
  103. :=:*00
  104. ;=;*00
  105. \ <=<*00
  106. \ \3D=\3D*00
  107. >=>*00
  108. ?=?*00
  109. @=@*00
  110. A=a*00
  111. B=b*00
  112. C=c*00
  113. D=d*00
  114. E=e*00
  115. F=f*00
  116. G=g*00
  117. H=h*00
  118. I=i*00
  119. J=j*00
  120. K=k*00
  121. L=l*00
  122. M=m*00
  123. N=n*00
  124. O=o*00
  125. P=p*00
  126. Q=q*00
  127. R=r*00
  128. S=s*00
  129. T=t*00
  130. U=u*00
  131. V=v*00
  132. W=w*00
  133. X=x*00
  134. Y=y*00
  135. Z=z*00
  136. \ [=[*00
  137. \5C=\5C*00
  138. ]=]*00
  139. ^=^*00
  140. _=_*00
  141. \ `=`*00
  142. a=a*00
  143. b=b*00
  144. c=c*00
  145. d=d*00
  146. e=e*00
  147. f=f*00
  148. g=g*00
  149. h=h*00
  150. i=i*00
  151. j=j*00
  152. k=k*00
  153. l=l*00
  154. m=m*00
  155. n=n*00
  156. o=o*00
  157. p=p*00
  158. q=q*00
  159. r=r*00
  160. s=s*00
  161. t=t*00
  162. u=u*00
  163. v=v*00
  164. w=w*00
  165. x=x*00
  166. y=y*00
  167. z=z*00
  168. \ {={*00
  169. \ |=|*00
  170. }=}*00
  171. ~=~*00
  172. =*00
  173.  
  174. \  these are down here since SNR uses a last-entered,
  175. \  first-tested heirarchy and we want the stuff we are defining
  176. \  below to override the stuff we have defined above.
  177.  
  178. :=:*01             \ a colon sets the flag
  179. ?=?*01             \ a question mark sets it
  180. !=!*01             \ a bang sets it
  181. .=.*01             \ a period sets the flag
  182. .\n=.\p1*00        \ a period followed by a number does not
  183. \0d\0a\0d\0a=\0d\0a\0d\0a*01           \ two CRs in a row do, too.
  184. \0a\0a=\0a\0a*01           \ two LFs in a row do, too.
  185.